/*
 * @Author: your name
 * @Date: 2020-07-29 13:51:04
 * @LastEditTime: 2020-08-05 09:23:27
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \dcg-vue-init\src\filter\index.js
 */
import Vue from 'vue'
// 自动注册全局路由
const files = require.context('.', false, /\.js$/)
const filterArr = files.keys().filter(key => key !== './index.js')

filterArr.forEach(v => {
  // 获取当前默认模块
  const obj = files(v).default
  for (const key in obj) {
    Vue.filter(key, obj[key])
  }
})
